#include <stdio.h>

typedef struct BNode{
    BNode * lchild;
    BNode * rchild;
    int data;
}BNode,*BTree;

int getDepth(BTree T){
    if(T == NULL)
        return 0;
    int leftDepth = getDepth(T->lchild);
    int rightDepth = getDepth(T->rchild);
    return leftDepth > rightDepth? leftDepth + 1:rightDepth + 1;
}